<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/*
			打印1-100的奇数,及其其和
			*/
			var sum = 0;
			for(var i = 1; i <= 100; i++){
				if(i%2 != 0){
					sum = sum+i;
					console.log(i);
					
				}
			}
			console.log(sum);
		</script>
	</body>
</html>
